import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

/// 隐私政策页面
class privacyPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _privacykeyPage();
  }
}

class _privacykeyPage extends State<privacyPage> {
  String _versionNare = "";

  Future<bool> _onWillPop() async {
    // PersonalPageState.globalKeythere.currentState?.reloadData();
    return true; // 返回true表示允许返回，返回false表示阻止返回
  }

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: _onWillPop,
      child: Scaffold(
        appBar: _buildTitleBar(context),
        body: SafeArea(
          child: Padding(
            padding: const EdgeInsets.all(40.0), // 设置内边距
            // 将 Column 包裹在 Center 中
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center, // 垂直居中
              children: [],
            ),
          ),
        ),
      ),
    );
  }

  AppBar _buildTitleBar(BuildContext context) {
    return AppBar(
      toolbarHeight: 60,
      leading: IconButton(
        icon: Icon(Icons.arrow_back_ios), // 使用没有横线的返回箭头图标
        onPressed: () {
          _onWillPop();
          // 返回操作
          Navigator.of(context).pop();
        },
      ),
      backgroundColor: Color(0xFFffffff),
      automaticallyImplyLeading: false,
      // 禁用自动生成的返回按钮
      title: Text(
        "隐私政策",
        style: TextStyle(
          fontSize: 17,
          fontFamily: "PingFang SC",
          fontWeight: FontWeight.w600,
        ),
      ),
      centerTitle: true,
    );
  }

// 账户安全

// 其他
}
